package com.sixtwo.member.dao;

import com.sixtwo.member.entity.Member;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

@Mapper
public interface MemberMapper {

    @Insert("INSERT INTO `member` (`username`, `nickname`, `phone`, `age`, `sex`, `birthday`, `idcard_type`, `dicard_number`, `email`, `note`, `enabled`)\n" +
            "VALUES\n" +
            "\t(#{username}, #{nickname}, #{phone}, #{age}, 1, now(), 0, '', '', '', 0)")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    public Long insert(Member member);
}
